package singleton;

/**
 * @author : DuJiabao
 * @Date : 2021/3/1 17:42
 * @Project : design-pattern
 * @File : null.java
 * @Desc : 静态内部类实现
 */
public class Singleton5 {
  private Singleton5() {
  }

  private static class SingletonInstance {
    private final static Singleton5 INSTANCE = new Singleton5();
  }

  // 返回对象
  public static Singleton5 getInstance() {
    return SingletonInstance.INSTANCE;
  }
}
